#include "RBTree.h"
#include <vector>
using namespace std;

//int main()
//{
//	// int a[] = { 16, 3, 7,11, 9, 26, 18, 14, 15 };
//	int a[] = { 4,2,6,1,3,5,15,7,16,14 };
//	RBTree<int, int> rb;
//	for (auto x : a)
//	{
//		rb.Insert(make_pair(x, x));
//	
//		cout << "Insert:" << x << "->" << rb.IsBalance() << endl;
//	}
//	
//	return 0;
//}

int main()
{
	const int N = 100000;
	vector<int> v;
	v.reserve(N);
	srand(time(0));

	for (size_t i = 0; i < N; i++)
	{
		v.push_back(rand());
	}
	RBTree<int, int> rb;
	for (auto x : v)
	{
		rb.Insert(make_pair(x, x));

	}
	cout << rb.IsBalance() << endl;

	return 0;
}